The present invention relates to network equipment receiving and transferring data packets on network lines and requiring segmentation of these packets into fixed length cells or to reassemble the frames from fixed length cells. More particularly, this invention relates to network adapters or blades performing such conversions.
Segmenting long variable frames into fixed length cells or reassembling variable frames from fixed length cells is handled today in network node adapters having to perform network protocol conversions when rerouting traffic from one network link to another when the network protocols are different. This is the case when variable length frames are received on an input LAN network link of an adapter and are sent as ATM fixed length cells on one output ATM link on the same adapter. The variable LAN frames received from the LAN input line are converted into ATM 53 byte cells before being sent on the ATM output line. One other case applies to a network node comprising a switching fabric supporting fixed length cells. The LAN frames received from LAN network lines need to be converted into fixed length cells before being sent to the bus of the switch fabric which will switch the cells toward a target adapter or blades.
As the segmenting function may be used on high speed links in network equipment and should sustain media speed and/or the switch fabric high speed, the network equipment manufacturers usually try to optimize the design of such a function. More particularly, in the implementation of segmenting variable length frames into cells, the way the cells are filled up with frame data has a direct effect on the throughput in the switching node. If the length of the frame is not a multiple of the cell length, bytes are unused in the last cell of the cells resulting from the segmenting of a frame. This induces a traffic bandwidth loss which is not negligible for high speed traffic. It can cause loss of 50% of the available bandwidth to the segmented traffic in the case of Ethernet traffic of 64 byte frames that are sent to a switch fabric which switches 64 byte fixed length cells. In this case, a 3 Gb network port of the blade will transmit only 1.5 Gb of efficient data over the switching fabric.
The background art for segmenting is the specification of the SAR (segmentation and reassembly) sublayer of the ATM Adaptation layers described in I.362 and I.363 ITU-T recommendations. More particularly for LAN frame traffic conveyed over ATM, the AAL4 or AAL5 SAR are used. These recommendations provide a message structure to segment the data units into cells which comprise a header and a trailer and only one information bit in the last cell of the frame. These recommendations do not take into consideration the space lost when all the cells are not all filled with frame data and thus does not prevent the lost of bandwidth in the segmented traffic generated by the adapters.
It is thus a general object of the present invention to provide a method and apparatus to save bandwidth when generating traffic resulting from the segmenting of variable length frames into fixed length cells.
This object of the invention is achieved by an apparatus, in a network equipment, for segmenting a succession of variable length packets stored as words in a first external storage unit into fixed length cells, said apparatus comprising:
a first input bus accessing the packet words of said first storage unit;
a second connecting bus accessing a second storage unit;
a finite state machine reading through said first bus the packet words in said first storage unit of the successive packets to be segmented;
an Add/substract unit, activated by said finite state machine through an internal bus, receiving input data from said finite state machine and from said second storage unit, said Add/substract unit computing the cell content, storing in said second storage unit cell information describing said cell content, said cell content comprising a defined fixed length cell header, data from one packet and data from other packets of said succession of packets if they are found in said first data store and if there is space enough in the cell to enter at least a defined fixed length new packet header after the last data of the previous packet;
a third connecting bus, connected to said finite state machine, through which a signal is received by said finite state machine requesting a new cell information, said finite state machine sending back through said third bus an acknowledgment when storing of cell information in said second storage unit is completed.
The invention also provides a method for preparing cell information describing the cell content to build the cells resulting from the segmenting of a succession of variable length packets stored as words in a first storage unit into fixed length cells, said method comprising:
reserving in the cell content the cell data for a defined fixed length cell header;
reading the packet data stored in said storage unit and reserving the cell space following the cell header for said packet data;
if the packet data does not completely fill the cell, checking if the remaining space in the cell is sufficient to contain at least a defined fixed length packet header;
if the remaining space in the cell is sufficient to contain at least said packet header, reserving the cell space for the next packet data;
repeating the previous two steps until the packet data completely fills the cell or the remaining space in the cell is not sufficient to contain at least one packet header;
if the packet data completely fills the cell, storing information describing the cell content, signaling to an outside interface that this information is ready and restarting the method at the first step until the last cell is written for said succession of packets.
One advantage of the solution is to enable a software or a hardware implementation. Another advantage is, when the invention is used in a network switch to segment variable frames into fixed length cells switched by a switch fabric, to allow the use for a less powerful switch fabric, having a higher clock cycle, which saves costs in the network switch.